package cn.gson.springboot.model.mapper.aftermapper;

import cn.gson.springboot.model.pjos.Target;
import cn.gson.springboot.model.vo.aftervo.DeptVo;
import cn.gson.springboot.model.vo.aftervo.PieDoubleVo;
import cn.gson.springboot.model.vo.aftervo.TargetFinishVo;
import cn.gson.springboot.model.vo.aftervo.TargetVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

@Repository
public interface TargetMapper {

    //销售目标值
    public List<TargetFinishVo> dateByValue(@Param("goalDate") Integer date);

    //销售完成值
    public List<TargetFinishVo> dateByFinish(@Param("orderTime") Integer date);

    //上半年销售目标值
    public Double firstYearByValue(@Param("goalDate") Integer date);

    //上半年销售完成值
    public Double firstYearByFinish(@Param("orderTime") Integer date);

    //右侧销售目标值详情
    public List<TargetVo> firstYearByValueDetails(Integer date, Integer month);

    //右侧销售完成值详情
    public List<TargetVo> firstYearByFinishDetails(Integer date, Integer month);

    //下半年销售目标值
    public Double secondYearByValue(@Param("goalDate") Integer date);

    //下半年销售完成值
    public Double secondYearByFinish(@Param("orderTime") Integer date);

    //全年销售完成值
    public Double thirdYearByValue(@Param("goalDate") Integer date);

    //全年销售目标值
    public Double thirdYearByFinish(@Param("orderTime") Integer date);

    //销售目标完成值
    public List<TargetVo> infoByMonth(@Param("orderTime") Integer date);

    //销售目标详情查询
    public List<TargetVo> targetAll(Integer data, Integer month);

    //详情员工名称
    public List<String> targetByName(Integer data, Integer month);

    //详情员工目标值
    public List<Double> targetValue(Integer data, Integer month);

    //详情员工完成值
    public List<Double> targetFinish(Integer data, Integer month);

    //详情完成率
    public List<Double> targetPercent(Integer data, Integer month);

    //部门下的员工
    public List<DeptVo> deptEmp();

    //查看未完成目标
    public List<Target> tareByDate(@Param("goalDate") String time,
                                   @Param("empName") String empName);

    //查询员工一年中目标的月份
    public List<Integer> empByDate(@Param("employeesId") Integer empId,
                                  @Param("goalDate") Integer date);

    //查询员工目标最大月份
    public Integer dateByMax(@Param("employeesId") Integer empId,
                                   @Param("goalDate") Integer date);

    //右侧月份图表月份名
    public List<String> chartByName(Integer date, Integer month);

    //右侧月份图表目标值
    public List<Double> chartByValue(Integer date, Integer month);

    //右侧月份图表完成值
    public List<Double> chartByFinish(Integer date, Integer month);

    //部门销售目标值
    public List<PieDoubleVo> deptByValue(Integer date, Integer month);

    //部门销售目标完成值
    public List<PieDoubleVo> deptByFinish(Integer date, Integer month);
}
